Imports System.Data.SqlClient
Public Class Trainees
    Public Shared Function GetTrainee() As DataTable

        'Str = "SELECT TRAINEE_ID,EMPLOYEE_NAME=ENGLISH_NAME +' ( '+KHMER_NAME+' )',SEX,DOB,PROVINCE,ADDRESS,PHONE,HOBBIES,NOTE,SALARY,START_DATE,PHOTO,TYPE,EMAIL,EXPECT_SALARY,APPLY_POSITION,ACTIVE FROM  VIEW_TRAINEE  WHERE ACTIVE=1 ORDER BY TRAINEE_ID ASC"
        Str = "SELECT * FROM VIEW_TRAINEE WHERE ACTIVE=1 ORDER BY TRAINEE_ID ASC"
        Try


            Dim dataAdapter As SqlDataAdapter
            dataAdapter = New SqlDataAdapter(Str, CType(Dbinterface.Connection, SqlConnection))
            Dim dataTable As DataTable = New DataTable()
            dataAdapter.Fill(dataTable)
            Return dataTable
        Catch ex As Exception
            MessageBox.Show(ex.ToString)
            Return Nothing
        End Try
    End Function

End Class